{extend name="base" /} {block name="css"}
<link rel="stylesheet" href="__CSS__/reply.css"> 
{/block} 
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="">
                <a href="{:url('admin/subscribereply/index')}">被关注回复</a>
            </li>
            <li class="">
                <a href="{:url('admin/defaultreply/index')}">默认回复</a>
            </li>
            <!-- <li class=""><a href="{:url('admin/subscribereply/poster')}">关注回复推广海报</a></li> -->
            <li class="layui-this">关键词回复</li>
        </ul>
        <div class="layui-tab-content">
            <div class="title">关键词回复</div>
            <div class="reply-list">
                <div class="content">
                    <div class="auto-reply">自动回复</div>
                    <div class="tips">通过编辑内容或关键词规则，快速进行自动回复设置。如具备开发能力，可更灵活地使用该功能。
                        <br />关闭自动回复之后，将立即对所有用户生效。</div>
                    <form class="layui-form" action="{:url('admin/kw_reply/save')}" method="post">
                        <div class="edit-reply">
                            <div class="layui-form-item">
                                <label class="layui-form-label">规则名称</label>
                                <div class="layui-input-block">
                                    <div style="width:calc(100% - 300px + 125px);">
                                        <input type="text" name="name" value="" required lay-verify="required" placeholder="输入规则名称" class="layui-input">
                                        <div class="remind">规则名最多60个字</div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">关键词</label>
                                <div class="layui-input-block">
                                    <div style="width: 125px;display: inline-block;">
                                        <select name="match[]" lay-verify="required">
                                            <option value="contain">半匹配</option>
                                            <option value="equal">全匹配</option>
                                        </select>
                                    </div>
                                    <div class="keyword">
                                        <div class="kw-ipt">
                                            <input type="text" name="keyword[]" value="" required lay-verify="required" placeholder="输入关键词" class="layui-input">
                                        </div>
                                        <div class="add-keyword" data-id = '1'>+</div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">回复内容</label>
                                <div class="layui-input-block" style="display: flex;align-items: center;">
                                    <div class="reply-content-add" data-id = '1'>
                                        <div class="reply-content-change">
                                            <div>+</div>
                                        </div>
                                    </div>
                                    <div class="reply-content-blank">
                                        <div class="reply-content-type">
                                            <input type="radio" lay-filter="type" name="genre" value="news" title="图文消息">
                                            <input type="radio" lay-filter="type" name="genre" value="text" title="文字">
                                            <input type="radio" lay-filter="type" name="genre" value="img" title="图片">
                                            <input type="radio" lay-filter="type" name="genre" value="voice" title="语音">
                                            <input type="radio" lay-filter="type" name="genre" value="video" title="视频">
                                        </div>
                                    </div>
                                </div>
                                <!-- <div class="layui-input-block">
                                    <textarea name="content[]" placeholder="添加回复文字" class="layui-textarea"></textarea>
                                </div> -->
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">回复方式</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="mode" value="reply_all" title="全部回复">
                                    <input type="radio" name="mode" value="random_one" title="随机回复一条" checked>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">取消</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script src="__JS__/reply/main.js"></script>
<script src="__JS__/jquery.rotate.js"></script>
{/block}